package com.elbis.business.entity;

import static javax.persistence.GenerationType.IDENTITY;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

@Entity
@Table(name = DataBaseConstants.TABLE_PENDING_ACTIVATIONS, catalog = DataBaseConstants.CATALOG)
public class PendingActivation implements Serializable {

	private static final long serialVersionUID = -8300967132754393317L;

	private Long id = null;

	private String token = null;

	private Date expires = null;

	private Gamer gamer = null;

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", nullable = false)
	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * @return the token
	 */
	public String getToken() {
		return token;
	}

	/**
	 * @param token
	 *            the token to set
	 */
	public void setToken(String token) {
		this.token = token;
	}

	/**
	 * @return the expires
	 */
	public Date getExpires() {
		return expires;
	}

	/**
	 * @param expires
	 *            the expires to set
	 */
	public void setExpires(Date expires) {
		this.expires = expires;
	}

	@OneToOne
	@JoinColumn(name = "gamer_id")
	/**
	 * @return the gamer
	 */
	public Gamer getGamer() {
		return gamer;
	}

	/**
	 * @param gamer
	 *            the gamer to set
	 */
	public void setGamer(Gamer gamer) {
		this.gamer = gamer;
	}

}
